<html>
<head><meta charset="utf-8"><title>hello · t-libs/wg-allocators · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/197181-t-libs/wg-allocators/index.html">t-libs/wg-allocators</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/197181-t-libs/wg-allocators/topic/hello.html">hello</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="164747825"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/197181-t-libs/wg-allocators/topic/hello/near/164747825" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Welcome Bot <a href="https://rust-lang.github.io/zulip_archive/stream/197181-t-libs/wg-allocators/topic/hello.html#164747825">(May 02 2019 at 21:35)</a>:</h4>
<p>Welcome to <a class="stream" data-stream-id="197181" href="/#narrow/stream/197181-t-libs.2Fwg-allocators">#t-libs/wg-allocators</a>.</p>
<p><strong>Description</strong>: Paving a path for a standard set of allocator traits to be used in collections!</p>



<a name="164747928"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/197181-t-libs/wg-allocators/topic/hello/near/164747928" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alex Crichton <a href="https://rust-lang.github.io/zulip_archive/stream/197181-t-libs/wg-allocators/topic/hello.html#164747928">(May 02 2019 at 21:36)</a>:</h4>
<p><span class="user-mention" data-user-id="220097">@Erich Gubler</span> <span aria-label="wave" class="emoji emoji-1f44b" role="img" title="wave">:wave:</span></p>



<a name="164747939"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/197181-t-libs/wg-allocators/topic/hello/near/164747939" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alex Crichton <a href="https://rust-lang.github.io/zulip_archive/stream/197181-t-libs/wg-allocators/topic/hello.html#164747939">(May 02 2019 at 21:37)</a>:</h4>
<p><span class="user-mention" data-user-id="220097">@Erich Gubler</span> <span aria-label="wave" class="emoji emoji-1f44b" role="img" title="wave">:wave:</span> trying again...</p>



<a name="164751159"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/197181-t-libs/wg-allocators/topic/hello/near/164751159" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Erich Gubler <a href="https://rust-lang.github.io/zulip_archive/stream/197181-t-libs/wg-allocators/topic/hello.html#164751159">(May 02 2019 at 22:31)</a>:</h4>
<p>Oh hi! :)</p>



<a name="164751191"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/197181-t-libs/wg-allocators/topic/hello/near/164751191" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Erich Gubler <a href="https://rust-lang.github.io/zulip_archive/stream/197181-t-libs/wg-allocators/topic/hello.html#164751191">(May 02 2019 at 22:31)</a>:</h4>
<p>Okay, so, what are action items right now? Should I just comb over the Allocator API tracking issue and figure out how to summarize it?</p>



<a name="164751498"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/197181-t-libs/wg-allocators/topic/hello/near/164751498" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Tim Diekmann <a href="https://rust-lang.github.io/zulip_archive/stream/197181-t-libs/wg-allocators/topic/hello.html#164751498">(May 02 2019 at 22:37)</a>:</h4>
<p>I think the first thing for using the allocator_api in collections is to associate <code>Box&lt;T, A: Alloc = Global&gt;</code>.  <a href="https://github.com/rust-lang/rust/pull/58457" target="_blank" title="https://github.com/rust-lang/rust/pull/58457">#58457</a> did some work on this, but it requires a <code>Default</code> bound as <code>DispatchFromDyn</code> could only use <code>PhantomData</code> as extra fields. Two days ago I made a PR to change this. <code>DispatchFromDyn</code> now can take any ZST field with alignment of 1, thus <code>Default</code> can be dropped as bound. </p>
<p>I made some tests on this: <a href="https://github.com/TimDiekmann/rust/commit/94031fd1f3c6dc1cb48474d5144003d697660b15" target="_blank" title="https://github.com/TimDiekmann/rust/commit/94031fd1f3c6dc1cb48474d5144003d697660b15">TimDiekmann@<code>97031fd</code></a><br>
Sadly, <code>rustc_typeck</code> (where <code>DispatchFromDyn</code> is checked) is used from the stage0 compiler, thus I had to dance with <code>#[cfg(stage0)]</code>.</p>



<a name="164751584"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/197181-t-libs/wg-allocators/topic/hello/near/164751584" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Tim Diekmann <a href="https://rust-lang.github.io/zulip_archive/stream/197181-t-libs/wg-allocators/topic/hello.html#164751584">(May 02 2019 at 22:38)</a>:</h4>
<p>Additionally we should decide, if we use <code>#[feature(allocator_api)]</code> for both, the api and the association with the collections, or split it up.</p>



<a name="164751694"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/197181-t-libs/wg-allocators/topic/hello/near/164751694" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Tim Diekmann <a href="https://rust-lang.github.io/zulip_archive/stream/197181-t-libs/wg-allocators/topic/hello.html#164751694">(May 02 2019 at 22:40)</a>:</h4>
<p>After this is finished, I think we can split up the work and associate an allocator with other collections.</p>



<a name="164751784"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/197181-t-libs/wg-allocators/topic/hello/near/164751784" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Tim Diekmann <a href="https://rust-lang.github.io/zulip_archive/stream/197181-t-libs/wg-allocators/topic/hello.html#164751784">(May 02 2019 at 22:42)</a>:</h4>
<blockquote>
<p>I just comb over the Allocator API tracking issue and figure out how to summarize it?</p>
</blockquote>
<p>Maybe one issue per item on the wg-repository?</p>



<a name="164761236"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/197181-t-libs/wg-allocators/topic/hello/near/164761236" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mike Hommey <a href="https://rust-lang.github.io/zulip_archive/stream/197181-t-libs/wg-allocators/topic/hello.html#164761236">(May 03 2019 at 01:55)</a>:</h4>
<p>ZSTs are not the long term play, though... we still need a story for non-ZST <code>A</code> in <code>Box&lt;T, A&gt;</code>. There was also the question whether the bound on A should be left out of the <code>struct Box</code> definition.</p>



<a name="164761312"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/197181-t-libs/wg-allocators/topic/hello/near/164761312" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mike Hommey <a href="https://rust-lang.github.io/zulip_archive/stream/197181-t-libs/wg-allocators/topic/hello.html#164761312">(May 03 2019 at 01:56)</a>:</h4>
<p>Actually... without a bound that says <code>A</code> is a ZST, how can <code>DispatchFromDyn</code> be impl'ed?</p>



<a name="164770990"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/197181-t-libs/wg-allocators/topic/hello/near/164770990" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Tim Diekmann <a href="https://rust-lang.github.io/zulip_archive/stream/197181-t-libs/wg-allocators/topic/hello.html#164770990">(May 03 2019 at 06:19)</a>:</h4>
<p>No, you are right, but in unblocks the PR. To proceed and implement it the semver compatible way, it can be implemented for <code>Global</code>.</p>



<a name="164774097"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/197181-t-libs/wg-allocators/topic/hello/near/164774097" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Simon Sapin <a href="https://rust-lang.github.io/zulip_archive/stream/197181-t-libs/wg-allocators/topic/hello.html#164774097">(May 03 2019 at 07:38)</a>:</h4>
<p>I’ve added a README and filed a couple of issues in <a href="https://github.com/rust-lang/wg-allocators" target="_blank" title="https://github.com/rust-lang/wg-allocators">https://github.com/rust-lang/wg-allocators</a></p>



<a name="164842037"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/197181-t-libs/wg-allocators/topic/hello/near/164842037" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Tim Diekmann <a href="https://rust-lang.github.io/zulip_archive/stream/197181-t-libs/wg-allocators/topic/hello.html#164842037">(May 04 2019 at 00:51)</a>:</h4>
<p>Wow, in 17 hours we filed 11 issues with 32 comments! <span aria-label="grinning" class="emoji emoji-1f600" role="img" title="grinning">:grinning:</span></p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>